<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
		<style type="text/css">
			.block {
				position: absolute;
				top: 0;
				left: 0;
				width: 100px;
				height: 100px;
				background: green;
				border: 1px solid;

			}
		</style>
	</head>
	<body>
		
		<div class="block">
			
		</div>
	</body>
	<script type="text/javascript">
		document.onmousemove = function(on){
			var ock = document.querySelector('.block');
			ock.style.left = on.clientX-50 + "px";
			ock.style.top = on.clientY-50 + "px";
			
		}
	</script>
</html>

